package com.cango.qutz.web.auth.menu.dao.impl;

import com.cango.qutz.web.auth.menu.dao.IMenuDao;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.cango.qutz.web.auth.menu.dao.IMenuDao;
import com.cango.framework.base.dao.BaseDaoImpl;

/**
 * <p>
 * ClassName: MenuDaoImpl
 * </p>
 * <p>
 * Description: 系统菜单dao实现类
 * </p>
 * <p>
 * Author: weih
 * </p>
 * <p>
 * Date: 2015-03-20
 * </p>
 */
@Repository("menuDao")
public class MenuDaoImpl extends BaseDaoImpl implements IMenuDao {

    /**
     * <p>
     * Field sqlSession: 注入sqlSession
     * </p>
     */
    @Autowired
    private SqlSessionTemplate sqlSession;

    @Override
    public int queryCountByMenuCode(String sqlId, String menuCode) {
        return this.sqlSession.selectOne(sqlId, menuCode);
    }

    @Override
    public int queryCountByButtonCode(String sqlId, String buttonCode) {
        return this.sqlSession.selectOne(sqlId, buttonCode);
    }

}
